# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2021年12月01日
"""
import pandas as pd

pd.set_option('display.unicode.ambiguous_as_wide',True)
pd.set_option('display.unicode.east_asian_width',True)
data = [[110, 105, 99], [105, 88, 115], [109, 120]]
index = [1, 2, 3]
columns = ['语文', '数学', '英语']
df = pd.DataFrame(data=data, index=index, columns=columns)
print(df)
print("=" * 30)
new = df.mean()
# 增加一行数据("语文","数学","英语"的平均值,忽略索引)
df = df.append(new,ignore_index=True)
print(df)
